package clam.apps.adu.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.StrictMode;
import android.widget.Toast;

public class VieMerdeEtudiantActivity extends Activity{

    private final static int DELAY = 3000;
    
    @Override
    protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        // cache l'ActionBar
    	this.getActionBar().hide();
        setContentView(R.layout.chargement);
    }
    
    @Override
    protected void onResume(){
    	super.onResume();
    	StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()
													   .permitAll().build();
    	StrictMode.setThreadPolicy(policy);
    	
        //Un handler permet de lancer un traitement dans le futur
		new Handler().postDelayed(new Runnable()
		{
		    @Override
		    public void run()
		    {
				// lance l'activity DernieresAnecdotesActivity
				startActivity(new Intent(VieMerdeEtudiantActivity.this, DernieresAnecdotesActivity.class));
				
				// termine l'activity en cours
				finish();
		        }
		    } , DELAY);
		}
}


	

